
<%@ page import="user.Tutor" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title>iPET - Tutor</title>
    </head>
    <body>
    	<g:render template="/common/menuUser" />
    	<div id="text">
        <div class="body">
            <h2>Editar tutor</h2>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${tutorInstance}">
            <div class="errors">
                <g:renderErrors bean="${tutorInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${tutorInstance?.id}" />
                <g:hiddenField name="version" value="${tutorInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nome"><g:message code="tutor.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" value="${tutorInstance?.nome}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="sobrenome"><g:message code="tutor.sobrenome.label" default="Sobrenome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'sobrenome', 'errors')}">
                                    <g:textField name="sobrenome" value="${tutorInstance?.sobrenome}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="login"><g:message code="tutor.login.label" default="Login" /></label>
                                </td>
                                <td valign="top" class="medium value ${hasErrors(bean: tutorInstance, field: 'login', 'errors')}">
                                    <g:textField name="login" value="${tutorInstance?.login}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="password"><g:message code="tutor.password.label" default="Senha" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'password', 'errors')}">
                                     <g:passwordField name="password" value="" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="email"><g:message code="tutor.email.label" default="Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" value="${tutorInstance?.email}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="titulacao"><g:message code="tutor.titulacao.label" default="Titulação" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'titulacao', 'errors')}">
                                    <g:textField name="titulacao" value="${tutorInstance?.titulacao}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="admission"><g:message code="tutor.admission.label" default="Ingresso" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: tutorInstance, field: 'admission', 'errors')}">
                                    <g:datePicker name="admission" precision="day" value="${tutorInstance?.admission}"  />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="Salvar" /></span>
                </div>
            </g:form>
        </div>
        </div>
    </body>
</html>
